﻿namespace KuiHuaBaoDian.Services.Asset {

    public static class AssetDownloadProgress {

        public static IAssetDownloadProgress Instantate() {
            var instance = KHBD.TypeMap.Instantiate<IAssetDownloadProgress>();
            return instance;
        }
    }

    /// <summary>
    /// 加载进度
    /// </summary>
    public interface IAssetDownloadProgress {

        /// <summary>
        /// 设置进度
        /// </summary>
        /// <param name="value">进度</param>
        void SetProgress(float value);
    }

    [Implement(typeof(IAssetDownloadProgress))]
    internal sealed class KHBD_AssetDownloadProgress : IAssetDownloadProgress {

        public float Progress { get; private set; }

        void IAssetDownloadProgress.SetProgress(float value) => Progress = value;
    }
}
